import { rcaNumberFormat } from './common.js'
import { commonTableOption } from './common.js'

export const tableOptionNormal = {
  ...commonTableOption,
  selection: false,
  column: [{
    type: 'select',
    label: '线路',
    prop: 'lineCode',
    search: true,
    searchLabelWidth: 100,
    cascaderItem: ['stationCode'],
    props: {
      label: 'name',
      value: 'code'
    },
    dicUrl: '/support/swparamline/dictsecondname',
  }, {
    type: 'date',
    label: '清分日期',
    prop: 'cleanTime',
    searchSpan: 12,
    searchRange: true,
    search: true,
    slot: true,
    valueFormat: 'yyyy-MM-dd',
  }, {
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '待清分金额',
    prop: 'waitClearAmount'
  }, {
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '系统清分金额',
    prop: 'sysClearAmount'
  }, {
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '人工清分金额',
    prop: 'manmadeClearAmount'
  }, {
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '合计金额',
    prop: 'totalAmount'
    // },	  {
    //   'type': 'input',
    //   label: '应急纸票回收金额(应急纸票、退票情况清分)(分)',
    //   prop: 'emeTicketRecoveryAmount'
    // },	  {
    //   'type': 'input',
    //   label: '应急纸票发售金额(应急纸票、退票情况清分)(分)',
    //   prop: 'emeTicketSaleAmount'
    // },	  {
    //   'type': 'input',
    //   label: '应急纸票清分金额(应急纸票、退票情况清分)(分)',
    //   prop: 'emeTicketClearAmount'
    // },	  {
    //   'type': 'input',
    //   label: '人工退款金额(应急纸票、退票情况清分)(分)',
    //   prop: 'manRefundAmount'
    // },	  {
    //   'type': 'input',
    //   label: '人工退款清分金额(应急纸票、退票情况清分)(分)',
    //   prop: 'manRefundClearAmount'
  }]
}
export const tableOptionEmergency = {
  ...commonTableOption,
  column: [{
    type: 'select',
    label: '线路',
    prop: 'lineCode',
    search: true,
    searchLabelWidth: 100,
    cascaderItem: ['stationCode'],
    props: {
      label: 'name',
      value: 'code'
    },
    dicUrl: '/support/swparamline/dictsecondname',
  }, {
    type: 'date',
    label: '清分日期',
    prop: 'cleanTime',
    searchSpan: 12,
    searchRange: true,
    search: true,
    slot: true,
    valueFormat: 'yyyy-MM-dd',
    // },   {
    //     'type': 'input',
    //     label: '开始时间YYYY-MM-DD',
    //     prop: 'beginTime'
    //   },	  {
    //     'type': 'input',
    //     label: '结束时间YYYY-MM-DD',
    //     prop: 'endTime'
  }, {
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '人工协议清分比例（与其他运营商）(分)',
    prop: 'agreeTicketClearProportionOther'
  }, {
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '人脸识别清分比例与人工协议清分比例（西安地铁）(分)',
    prop: 'faceTicketClearProportion'
  }, {
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '待清分金额(分)',
    prop: 'waitClearAmount'
  }, {
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '系统清分金额(分)',
    prop: 'sysClearAmount'
  }, {
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '人工清分金额(分)',
    prop: 'manmadeClearAmount'
  }, {
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '合计金额(分)',
    prop: 'totalAmount'
  }, {
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '应急纸票回收金额(应急纸票、退票情况清分)(分)',
    prop: 'emeTicketRecoveryAmount'
  }, {
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '应急纸票发售金额(应急纸票、退票情况清分)(分)',
    prop: 'emeTicketSaleAmount'
  }, {
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '应急纸票清分金额(应急纸票、退票情况清分)(分)',
    prop: 'emeTicketClearAmount'
  }, {
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '人工退款金额(应急纸票、退票情况清分)(分)',
    prop: 'manRefundAmount'
  }, {
    type: 'input',
    showSummary: true,
    precision: 2,
    formatter: (row, value, label, column) => {
      return rcaNumberFormat(value, true)
    },
    label: '人工退款清分金额(应急纸票、退票情况清分)(分)',
    prop: 'manRefundClearAmount'
  }]
}

export const tableOptions = {
  normal: tableOptionNormal,
  emergency: tableOptionEmergency
}
